home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / lcad40.zip / LCAD.BAT < prev    next >
DOS Batch File  |  1992-05-11  |  1KB  |  47 lines

  1. @Echo Off
  2. Rem *=======================[LCAD.Bat]=================================*
  3. Rem Use this batch file to loop LaunchCAD. You can rename it if you wish
  4. Rem or copy it's contents to another batch file.
  5. Rem LaunchCAD copyright 1988-1992 Mountain Software
  6. Rem *==================================================================*
  7.  
  8. :CheckEnv
  9.   Set TESTENV=test
  10.   If Not "%TESTENV%"=="test" goto EnvError
  11.   Set TESTENV=
  12.  
  13. Rem *- Put programs here to run before LaunchCAD and AutoCAD
  14. Rem *- load display drivers, EXTLISP, etc.
  15.  
  16. :Loop
  17.   LC %1
  18.   If ErrorLevel 3 Goto :Error
  19.  
  20. Rem *- If you wish to execute AutoCAD using "Batch" mode then Configure
  21. Rem *- LaunchCAD with a blank "CAD Program Filename"
  22.  
  23.   If ErrorLevel 2 Goto Batch
  24.   Goto Loop_Check
  25. :Batch
  26.   Echo Executing AutoCAD in Batch mode...
  27.   If "%USERNAME%"=="" Set USERNAME=LC
  28.   ACAD !BATCH! %USERNAME%
  29.  
  30. :Loop_Check
  31.   If ErrorLevel 1 GoTo Done
  32.   GoTo :Loop
  33. :Done
  34.  
  35. Rem *- Put programs here to run after AutoCAD to unload drivers, etc.
  36.  
  37.   GoTo End
  38. :Error
  39.   Echo An ERROR was detected by LaunchCAD
  40.   GoTo End
  41. :EnvError
  42.   Echo Environment full.  Try adding /E:1024 to SHELL line of CONFIG.SYS, then reboot.
  43.   Echo Example: SHELL=C:\COMMAND.COM /E:1024 /P
  44.   Set TESTENV=
  45. :End
  46.  
  47.